package com.wuye.basic.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wuye.basic.mapper.WyOwnerMapper;
import com.wuye.basic.domain.WyOwner;
import com.wuye.basic.service.IWyOwnerService;

/**
 * 业主Service业务层处理
 * 
 * @author avalon
 * @date 2024-11-25
 */
@Service
public class WyOwnerServiceImpl extends ServiceImpl<WyOwnerMapper, WyOwner> implements IWyOwnerService
{
    @Autowired
    private WyOwnerMapper wyOwnerMapper;

    /**
     * 查询业主
     * 
     * @param ownerId 业主主键
     * @return 业主
     */
    @Override
    public WyOwner selectWyOwnerByOwnerId(Long ownerId)
    {
        return wyOwnerMapper.selectWyOwnerByOwnerId(ownerId);
    }

    /**
     * 查询业主列表
     * 
     * @param wyOwner 业主
     * @return 业主
     */
    @Override
    public List<WyOwner> selectWyOwnerList(WyOwner wyOwner)
    {
        return wyOwnerMapper.selectWyOwnerList(wyOwner);
    }

    /**
     * 新增业主
     * 
     * @param wyOwner 业主
     * @return 结果
     */
    @Override
    public int insertWyOwner(WyOwner wyOwner)
    {
        return wyOwnerMapper.insertWyOwner(wyOwner);
    }

    /**
     * 修改业主
     * 
     * @param wyOwner 业主
     * @return 结果
     */
    @Override
    public int updateWyOwner(WyOwner wyOwner)
    {
        return wyOwnerMapper.updateWyOwner(wyOwner);
    }

    /**
     * 批量删除业主
     * 
     * @param ownerIds 需要删除的业主主键
     * @return 结果
     */
    @Override
    public int deleteWyOwnerByOwnerIds(Long[] ownerIds)
    {
        return wyOwnerMapper.deleteWyOwnerByOwnerIds(ownerIds);
    }

    /**
     * 删除业主信息
     * 
     * @param ownerId 业主主键
     * @return 结果
     */
    @Override
    public int deleteWyOwnerByOwnerId(Long ownerId)
    {
        return wyOwnerMapper.deleteWyOwnerByOwnerId(ownerId);
    }
}
